package com.aizuda.boot.modules.third.wps.controller;

import com.aizuda.boot.modules.third.wps.domain.vo.ResponseDTO;
import com.aizuda.boot.modules.third.wps.domain.vo.UserVo;
import com.aizuda.boot.modules.third.wps.service.UserService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author hjw
 * @description
 * @date 2025年06月17日 18:00
 */
@Tag(name = "WebOffice用户信息接口", description = "WebOffice用户信息接口")
@RestController
@RequestMapping("third/wps/v3/3rd")
public class UserController {

    @Autowired
    private UserService userService;

    /**
     * 获取用户信息
     *
     * @param userIds 用户ID列表
     * @return ResponseDTO<List<UserVo>>
     */
    @Operation(summary = "获取用户信息", description = "根据用户ID列表获取用户信息")
    @GetMapping("users")
    public ResponseDTO<List<UserVo>> getUsers(
            @RequestParam("user_ids") List<Long> userIds
    ) {

        return ResponseDTO.success(userService.getUsers(userIds));
    }

}
